package dvlp.jhlee.myhomeinventory.controller;

import org.slim3.controller.Controller;
import org.slim3.controller.Navigation;

import dvlp.jhlee.myhomeinventory.model.User;
import dvlp.jhlee.myhomeinventory.service.UserService;

public class CreateDbController extends Controller {

    @Override
    public Navigation run() throws Exception {
        addUser("abcd", "user1", 35.679975, 139.746121);
        return null;
    }

    /** ロケーションテーブルにレコードを追加 */
    private void addUser(String groupId, String userName, double latitude, double longitude) {
        User user = new User();
        user.setLoginId("loginId2");
        user.setName("name2");
        user = new UserService().insert(user);
    }
}